package com.md.service;

import com.md.entity.myStudent;
import com.md.mapper.studentMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class studentServiceImpl implements studentService{
    @Autowired
    private studentMapper studentMapper;
    @Override
    public List<myStudent> selectAll() {
        return studentMapper.selectAll();
    }

    @Override
    public myStudent selectOne(int id) {
        return studentMapper.selectOne(id);
    }

    @Override
    public List<myStudent> selectByName(String name) {
        return studentMapper.selectByName(name);
    }

    @Override
    public boolean add(myStudent myStudent) {
        return studentMapper.add(myStudent)>0;
    }

    @Override
    public boolean delete(int id) {
        return studentMapper.delete(id)>0;
    }

    @Override
    public boolean change(myStudent myStudent) {
        return studentMapper.change(myStudent)>0;
    }
}
